package com.jack.lib.base.header.style

import android.graphics.Color
import android.graphics.Rect
import android.view.ViewGroup
import androidx.core.graphics.drawable.toDrawable
import androidx.core.graphics.toColor
import com.blankj.utilcode.util.CloneUtils
import com.jack.lib.base.R
import com.jack.lib.base.header.HeaderIcon
import com.jack.lib.base.header.IHeaderStyle
import com.jack.lib.base.header.IconType
import com.jack.lib.core.ext.MM
import com.jack.lib.core.ext.color
import com.jack.lib.core.ext.drawable
import kotlin.reflect.KProperty

/**
 * author : chong.huang
 * create : 2022/1/2
 * desc   :
 */
open class GoogleStyle: IHeaderStyle {

    override var backgroundColor: Int = R.color.toolbar_color.color

    override var elevation: Int = 0

    override var width: Int = ViewGroup.LayoutParams.MATCH_PARENT

    override var height: Int = 176.MM

    override var paddingTop: Int = 50.MM

    override var immersed: Boolean = false

    override var icons: MutableList<HeaderIcon> = mutableListOf<HeaderIcon>().also {
        it.add(HeaderIcon(
            type = IconType.BACK,
            drawable = R.drawable.base_ic_arrow_left_white.drawable,
            width = 40.MM,
            height = 40.MM
        ))
        it.add(HeaderIcon(
            type = IconType.TITLE_LEFT,
            textColor = Color.WHITE,
            textSize = 32.MM,
            width = ViewGroup.LayoutParams.WRAP_CONTENT,
            height = ViewGroup.LayoutParams.WRAP_CONTENT
        ))
        it.add(HeaderIcon(
            type = IconType.RIGHT,
            drawable = R.drawable.base_ic_other_white.drawable,
            width = 40.MM,
            height = 40.MM
        ))

    }
}